<?php
class TaobaoApi extends Object {
    protected $_params = array( //common fields
        'api_key'   => var_get('taobao/appkey'),
        'format'    => 'json',
        'v'         => '1.0',
        'timestamp' => date('Y-m-d H:i:s'),
        'fields'    => '',
        );

    public function __construct($params = array()) {
        //merge $params with $this->_params
        foreach ($params as $key => $value) {
            $this->_params[$key] = $value;
        }
    }
}